// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; version 2 of the License.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

#include "Orbit.h"

Orbit::Orbit(void)
{
	period = 0;
	parent = NULL;
}

Orbit::~Orbit(void)
{
}

void Orbit::sample(double start, double t, int nSamples, std::vector<VECTOR>* points)
{
	double dt = t / (double) nSamples;
	for (int i = 0; i < nSamples+1; i++) {
		points->push_back(computePosition(start + dt * i));
	}
}

double Orbit::getPeriod()
{
	return period;
}